# 
# Copyright (C) 2008 CrisOs.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$

include $(TOPDIR)/rules.mk

PKG_NAME:=libssd1303
PKG_REV:=19
PKG_VERSION:=r$(PKG_REV)
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ssd1303oled.googlecode.com/svn/trunk/lib/
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_PROTO:=svn

include $(INCLUDE_DIR)/package.mk

define Package/libssd1303
  SECTION:=libs
  CATEGORY:=Libraries
  DEPENDS:=+kmod-ssd1303
  DEPENDS:=@TARGET_etrax
  TITLE:=libssd1303
endef

define Package/libssd1303/description
endef

define Build/Compile
	$(MAKE) -C $(PKG_BUILD_DIR) \
		$(TARGET_CONFIGURE_OPTS) \
		CFLAGS="$(TARGET_CFLAGS)"
endef

define Package/libssd1303/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/libssd1303.so $(1)/usr/lib/
endef

$(eval $(call BuildPackage,libssd1303))
